package pers.hl.module_main.main

import android.os.Bundle
import androidx.fragment.app.Fragment
import com.alibaba.android.arouter.facade.annotation.Route
import com.blankj.utilcode.util.FragmentUtils
import pers.hl.common.base.BaseVBVMActivity
import pers.hl.lib_global.arouter.RouterPath
import pers.hl.module_main.R
import pers.hl.module_main.databinding.MainActivityMainBinding
import pers.hl.module_main.mine.MineViewModel

@Route(path = RouterPath.main)
class MainActivity : BaseVBVMActivity<MainActivityMainBinding, MineViewModel>() {

    override fun initView(savedInstanceState: Bundle?) {
        replaceFragment(MainFragment())
    }

    override fun initData(savedInstanceState: Bundle?) {

    }

    fun replaceFragment(fragment: Fragment) {
        FragmentUtils.replace(supportFragmentManager, fragment, R.id.fl_container)
    }

}